Template index • NIR & GREEN ratio

SGL – Spectral Gradient Land Index (Template)

SGL is provided here as a template index page in your library. The example definition below uses a normalized difference between NIR and GREEN reflectance. You can easily replace this formula and description with your own SGL definition.


SGL overview example concept & use-cases

What does SGL measure? (example)

In this example, SGL compares the near-infrared (NIR) and green reflectance to enhance vegetation vs. soil / background contrast. Healthy vegetation typically shows high NIR and moderate green, whereas bare soil has lower NIR and different visible behaviour.

  • Quick contrast between vegetated and non-vegetated land (example use).
  • Additional feature in ML models together with NDVI / GNDVI.
  • Exploratory index for land-surface spectral gradients.
  • Placeholder slot for your own SGL definition in the library.

Important: SGL here is intentionally generic. Replace the text, formula and code with your actual SGL index (e.g. soil, geology, snow or any custom index you use in your work).

SGL formula (example)

General normalized difference (NIR & GREEN)
SGL = (NIR - GREEN) / (NIR + GREEN)

Higher SGL values are expected where NIR is dominant compared with green (typical of healthy vegetation), whereas lower or negative values are more typical of soil or other background targets.

Sentinel-2 MSI
SGL = (B8 - B3) / (B8 + B3)

B8 = NIR, B3 = GREEN.

Landsat 8 / 9 (OLI)
SGL = (B5 - B3) / (B5 + B3)

B5 = NIR, B3 = GREEN.

Feel free to replace this entire block with the exact SGL expression you want to document (including different bands or sensors).

Required bands (example)

Sensors & spectral bands

Sensor GREEN NIR
Landsat 8 / 9 OLI B3 B5
Sentinel-2 MSI B3 B8

Tip: if your SGL is actually a soil / geology / snow index, just edit this table and band list to match your real definition.

Typical behaviour (example)

Land-cover type SGL trend
Dense healthy vegetation Higher positive SGL
Mixed vegetation / soil Intermediate SGL
Bare soil / urban Lower or near-zero SGL
Water / shadow Very low or noisy SGL

These ranges are illustrative only. Once you finalize your SGL definition, update this table based on your calibration / tests.

Using SGL in Google Earth Engine (example)

  1. Select a surface-reflectance collection (Sentinel-2 SR or Landsat 8/9 SR).
  2. Filter by date, cloud cover and region of interest (ROI).
  3. Compute SGL as (NIR - GREEN) / (NIR + GREEN) or your custom expression.
  4. Visualize the index and export if needed.
// SGL – Example Spectral Gradient Land Index (Sentinel-2) in Google Earth Engine
var roi = /* your geometry here */;

// Sentinel-2 surface reflectance
var s2 = ee.ImageCollection('COPERNICUS/S2_SR')
  .filterBounds(roi)
  .filterDate('2023-01-01', '2023-12-31')
  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
  .median();

// Bands (already reflectance in S2_SR)
var green = s2.select('B3');
var nir   = s2.select('B8');

// Example SGL = (NIR - GREEN) / (NIR + GREEN)
var sgl = nir.subtract(green)
  .divide(nir.add(green))
  .rename('SGL');

// Visualisation
Map.centerObject(roi, 10);
Map.addLayer(sgl, {
  min: -1.0, max: 1.0,
  palette: ['#0b1120','#1d4ed8','#22c55e','#eab308','#f97316','#f97373']
}, 'SGL (example)');

// Optional export
Export.image.toDrive({
  image: sgl,
  description: 'SGL_example_Sentinel2',
  region: roi,
  scale: 10,
  maxPixels: 1e13
});

Important: treat this page as a template shell. When you finalize what SGL means in your library, simply replace: the description, formula, bands and code with your final version.

Part of the Start4IT Remote Sensing Indices Library. More indices & ready-to-use code: www.start4it.com/rs-indices